import Vue from 'vue'
import Vuex from 'vuex'
import createPersistedState from 'vuex-persistedstate'
Vue.use(Vuex)
import state from '@/store/state.js'
import actions from '@/store/action.js'
import getters from '@/store/getters.js'
import mutations from '@/store/mutations.js'
const Store = new Vuex.Store({
	state,
	actions,
	getters,
	mutations,
	plugins: [
		createPersistedState({
			storage: {
				getItem: key => wx.getStorageSync(key),
				setItem: (key, value) => wx.setStorageSync(key, value),
				removeItem: key => {}
			}
		})
	],
})
export default Store
